/**
  @file
  @author Stefan Frings
*/

#ifndef DO_CONTROLLER_H
#define DO_CONTROLLER_H

#include "httprequest.h"
#include "httpresponse.h"
#include "httprequesthandler.h"
#include "Json\json.h"
#include <QImage>
#include <QReadWriteLock>
#include <QDateTime>
#include <QTimer>
#include "filelogger.h"

using namespace stefanfrings;
/**
  This controller dumps the received HTTP request in the response.
*/


class DoController : public HttpRequestHandler {
    Q_OBJECT
    Q_DISABLE_COPY(DoController)
public:
	static void init();
	static void deinit();

    /** Constructor */
    DoController();

    /** Generates the response */
    void service(HttpRequest& request, HttpResponse& response);	

protected:	
	void logReguest(HttpRequest& request);		
	
	static QString mLogPath;	
	static QSharedPointer<stefanfrings::FileLogger> mServerLogger;
};

#endif // DoController_H
